Retry "use of closed network connection" in s3 backup handle#6182
Merged
deepthi merged 4 commits intovitessio:masterfrom May 15, 2020
Merged
Retry "use of closed network connection" in s3 backup handle#6182deepthi merged 4 commits intovitessio:masterfrom
deepthi merged 4 commits intovitessio:masterfrom
Conversation
Collaborator
|
hi @ajm188! can you fix the DCO? |
added 3 commits
May 14, 2020 14:05
…aking s3 backups Signed-off-by: Andrew Mason <amason@slack-corp.com>
The error likely gets thrown [here](https://github.com/aws/aws-sdk-go/blob/master/aws/corehandlers/handlers.go#L164), so it seems it would return "send request failed", and the original error message won't be in `r.Error.Error()` but rather in the `OrigErr()` of the `awserr.Error`. So in order to match the closed connection error, we will need to check if `r.Error` is an `awserr.Error` and then check the `OrigErr()` Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
adb58d0 to
3dc147c
Compare
deepthi
reviewed
May 14, 2020
| "github.com/aws/aws-sdk-go/aws/request" | ||
| ) | ||
|
|
||
| type ClosedConnectionRetryer struct { |
Collaborator
There was a problem hiding this comment.
Looks like this struct satisfies a particular interface. That should be documented.
Signed-off-by: Andrew Mason <amason@slack-corp.com>
30ea25d to
5bcf1c6
Compare
morgo
added a commit
to planetscale/vitess
that referenced
this pull request
May 19, 2020
Signed-off-by: Morgan Tocker <tocker@gmail.com>
morgo
added a commit
that referenced
this pull request
May 19, 2020
Backport s3 retry from #6182 to release branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This address some of the issues with taking backups with s3backupstorage after upgrade to aws-sdk-go version 1.28.x.
The approach is to create a custom retryer to check for errors that match the "closed network connection" error string.
When creating the retryer, embed aws's
DefaultRetryer(which is the logic that gets used if you don't specify anything), and use this to determine the rest of the retryable errors, as well as the backoff logic.